<?php
/*
 * code to delete a user's timesheet line
*/
// Create connection
include("../inc_files/utils/dbconnection.php");

//sanitise the input data
$lineID = $mysqli->real_escape_string($_POST['lineid']);

//create query to flag the task as deleted
$query="DELETE FROM timesheet_lines WHERE TimesheetLineID = '$lineID';";

//execute query
$mysqli->query($query) or die($mysqli->error);

//tidy up database connection
$mysqli->close();

echo "success";

?>